#include <stdlib.h> // needed for size_t

/**
 * The stack that holds all our values
 * int* stack     | a pointer to an array of ints
 * int stack_size | the size of the stack in memory kind of (num of elements in pointer)
 * int stack_used | number of elements used in array
 * int reg[4]     | the registary, storing only four values
 */
typedef struct stack_c {
	int* stack_array;
	size_t stack_size;
	size_t stack_used;
	int reg[4];

	int (*push)(struct stack_c* self, int* value); // pushes int value to top of stack
	int (*free)(struct stack_c* self); // frees the stack. don't use it again if you call this
} stack_c;

/**
 * inits the stack. MUST USE before using stack.
 * @param  stack pointer to the stack
 * @return       status, 0 is okay something else is not okay
 */
int stackInit(stack_c* stack);